/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.bs.Beans;

import java.io.Serializable;
import java.math.BigDecimal;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Bone
 */
@Entity
@Table(name = "tribut_iss")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "TributIss.findAll", query = "SELECT t FROM TributIss t")})
public class TributIss implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(nullable = false)
    private Integer id;
    @Column(name = "MODALIDADE_BC")
    private Character modalidadeBc;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Column(name = "PORCENTO_BC", precision = 18, scale = 6)
    private BigDecimal porcentoBc;
    @Column(name = "ALIQUOTA_PORCENTO", precision = 18, scale = 6)
    private BigDecimal aliquotaPorcento;
    @Column(name = "ALIQUOTA_UNIDADE_ISS", precision = 18, scale = 6)
    private BigDecimal aliquotaUnidadeIss;
    @Column(name = "PAUTA_PRECO_MAXIMO", precision = 18, scale = 6)
    private BigDecimal pautaPrecoMaximo;
    @JoinColumn(name = "ID_TRIBUT_OPERACAO_FISCAL", referencedColumnName = "ID", nullable = false)
    @ManyToOne(optional = false)
    private TributOperacaoFiscal idTributOperacaoFiscal;

    public TributIss() {
    }

    public TributIss(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Character getModalidadeBc() {
        return modalidadeBc;
    }

    public void setModalidadeBc(Character modalidadeBc) {
        this.modalidadeBc = modalidadeBc;
    }

    public BigDecimal getPorcentoBc() {
        return porcentoBc;
    }

    public void setPorcentoBc(BigDecimal porcentoBc) {
        this.porcentoBc = porcentoBc;
    }

    public BigDecimal getAliquotaPorcento() {
        return aliquotaPorcento;
    }

    public void setAliquotaPorcento(BigDecimal aliquotaPorcento) {
        this.aliquotaPorcento = aliquotaPorcento;
    }

    public BigDecimal getAliquotaUnidadeIss() {
        return aliquotaUnidadeIss;
    }

    public void setAliquotaUnidadeIss(BigDecimal aliquotaUnidadeIss) {
        this.aliquotaUnidadeIss = aliquotaUnidadeIss;
    }

    public BigDecimal getPautaPrecoMaximo() {
        return pautaPrecoMaximo;
    }

    public void setPautaPrecoMaximo(BigDecimal pautaPrecoMaximo) {
        this.pautaPrecoMaximo = pautaPrecoMaximo;
    }

    public TributOperacaoFiscal getIdTributOperacaoFiscal() {
        return idTributOperacaoFiscal;
    }

    public void setIdTributOperacaoFiscal(TributOperacaoFiscal idTributOperacaoFiscal) {
        this.idTributOperacaoFiscal = idTributOperacaoFiscal;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TributIss)) {
            return false;
        }
        TributIss other = (TributIss) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.bs.Beans.TributIss[ id=" + id + " ]";
    }
    
}
